<template>
  <view @click="toInfo" class="notice-car">
    <view class="car-title">
        <view class="tip">{{name}}</view>
        <view class="tip-content">{{item.title}}</view>
    </view>
    <view class="rich">

        <rich-text :nodes="item.textHtml"></rich-text>

    </view>
    <view class="car-bm">
        <view class="bm-time">{{item.createTime}}</view>
        <view class="bm-info">查看详情 <fui-icon size="28" name="arrowright"></fui-icon></view>
    </view>
  </view>
</template>

<script setup lang="ts">
import type { IListByTypeRes } from "@/api/model/dyNoticeModel";
    interface IProps {
    item:IListByTypeRes
    name:string
}

const props  = withDefaults(defineProps<IProps>(), {})

const toInfo = ()=>{

    uni.navigateTo({
        url:`/subPackages_play/notice/noticeInfo?data=${JSON.stringify(props.item)}`
    })

}
</script>

<style lang="scss" scoped>

.notice-car{
    background-color: white;
    margin-top: 20rpx;
    border-radius: 20rpx;
    padding: 20rpx;
    .car-title{
        display: flex;
        align-items: center;
        .tip{
            font-size: 20rpx;
            background: rgb(231,227,252);
            width: 100rpx;
            padding: 8rpx 0;
            text-align: center;
            border-radius: 10rpx;
            color: rgb(112,94,211);
        }
        .tip-content{
            font-weight: bolder;
            margin-left: 15rpx;
        }
    }
    .car-bm{
        font-size: 23rpx;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .bm-info{
            display: flex;
            align-items: center;
            color: rgb(115,98,214);
        }
        .bm-time{
            color: $uni-text-color-placeholder;
        }
    }
    .rich{
        height: 300rpx;
        overflow: hidden;
        margin-bottom: 20rpx;
        padding-bottom: 20rpx;
    }
}

</style>
